/**
 * 
 */
package org.dragonfire.dasm.directives;

import java.util.ArrayList;

import org.dragonfire.dasm.Command;
import org.dragonfire.dasm.Listing;
import org.dragonfire.dasm.DirectiveManager.Directive;

/**
 * Causes the current file to be popped off of the file stack and execution to
 * return to the previous file. This directive will not clear up the block
 * stack, so be careful not to use it inside of an <code>#IF</code> block.<br />
 * <br />
 * Format:<br />
 * <code>#END</code><br />
 * <br />
 * Parameters:<br />
 * <i>None</i><br />
 * <br />
 * Errors:<br />
 * <i>None</i>
 * 
 * @author Darth Android
 * @version 2.0
 */
public class End extends Directive {

	/**
	 * {@inheritDoc}
	 */
	@Override
	public ArrayList<Listing> pass1(Command c) {
		// pop the active file off of the file stack
		getPreprocessor().popFile();
		return null;
	}
}
